/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;

import constants.Constants;
import java.util.ArrayList;

public  class BookingController {
    
    public static boolean insert(int idroom, int idcustomer){
        return new dao.Booking().addBooking(idroom, idcustomer);     
    }
    public static boolean update(int idroom,int idcustomer){
        return new dao.Booking().addBooking(idroom, idcustomer);
    }
    public static boolean remove(int idcustomer){
        return new dao.Booking().deleteBooking(idcustomer);
    }
    public static ArrayList<entity.Booking> getAll(){        
        return new dao.Booking().getAllBooking();
    }
    public static ArrayList<entity.Room> getRoomByCustomer(int id){
        return new dao.Booking().getRoombyIdCustomer(id);
    }
    public static entity.Customer getCustomerByRoom(int id){
        return new dao.Booking().getCustomerByRoom(id);
    }
    public static ArrayList<entity.Booking> getAllByCustomer(int id){
        return new dao.Booking().getAllById(id);
    }

}
